// 抽象产品类：Computer
abstract class Computer {
    public abstract void launch();
}

// 具体产品类：MacBook
class MacBook extends Computer {
    @Override
    public void launch() {
        System.out.println("Launching MacBook...");
    }
}

// 具体产品类：MiBook
class MiBook extends Computer {
    @Override
    public void launch() {
        System.out.println("Launching MiBook...");
    }
}

// 抽象产品类：Phone
abstract class Phone {
    public abstract void launch();
}

// 具体产品类：IPhone
class IPhone extends Phone {
    @Override
    public void launch() {
        System.out.println("Launching iPhone...");
    }
}

// 具体产品类：MiPhone
class MiPhone extends Phone {
    @Override
    public void launch() {
        System.out.println("Launching MiPhone...");
    }
}

// 抽象工厂类：AbstractFactory
abstract class AbstractFactory {
    public abstract Computer computer();
    public abstract Phone phone();
}

// 具体工厂类：AppleFactory
class AppleFactory extends AbstractFactory {
    @Override
    public Computer computer() {
        return new MacBook();
    }

    @Override
    public Phone phone() {
        return new IPhone();
    }
}

// 具体工厂类：MiFactory
class MiFactory extends AbstractFactory {
    @Override
    public Computer computer() {
        return new MiBook();
    }

    @Override
    public Phone phone() {
        return new MiPhone();
    }
}

// 客户端代码
public class Client {
    public static void main(String[] args) {
        AbstractFactory appleFactory = new AppleFactory();
        Computer appleComputer = appleFactory.computer();
        Phone applePhone = appleFactory.phone();
        
        appleComputer.launch();
        applePhone.launch();
        
        AbstractFactory miFactory = new MiFactory();
        Computer miComputer = miFactory.computer();
        Phone miPhone = miFactory.phone();
        
        miComputer.launch();
        miPhone.launch();
    }
}